package com.bdqn.component;

import java.io.File;

/**
 * 系统中的常量
 *
 * @author jinge
 */
public class BlogConstants {

    public static String SAVE_PATH = "static" + File.separator + "client" + File.separator + "img" + File.separator;
    public static String MAPPING_PATH = "static/client/img/";

    public static String IOCAl_PATH = "blogStatic";
    public static String IOCAl_MAPPING = "public/";
    /**
     * 登录存在在session中的key
     */
    public static String LOGIN_SESSION_KEY = "loginUser";
    public static String USER_SESSION_KEY = "blogUser";


    /**
     * 微信二维码映射地址
     */
    public static String WECHAT_MAPPING_URL = MAPPING_PATH + "wechat/";

    /**
     * 微信二维码保存的相对路径
     */
    // public  static    String   WECHAT_SAVE_PATH="static"+File.separator+"client"+File.separator+"img"+File.separator+"wechat";
    public static String WECHAT_SAVE_PATH = SAVE_PATH + "wechat";

    /**
     * banner映射地址
     */
    public static String BANNER_MAPPING_URL = MAPPING_PATH + "banner/";

    /**
     * banner保存的相对路径
     */
    public static String BANNER_SAVE_PATH = SAVE_PATH + "banner";


    /**
     * 用户头像的映射地址
     */
    public static String PHOTO_MAPPING_URL = MAPPING_PATH + "photo/";


    /**
     * 用户头像保存地址
     */
    // public  static    String   PHOTO_SAVE_PATH="static"+File.separator+"client"+File.separator+"img"+File.separator+"photo";
    public static String PHOTO_SAVE_PATH = SAVE_PATH + "photo";

    /**
     * 文章图片的映射地址
     */
    public static String ARTICLE_MAPPING_URL = MAPPING_PATH + "article/";
    /**
     * 相册的保存地址：
     */
    public static String ALBUM_SAVE_PATH = SAVE_PATH + "album";

    /**
     * 相册的映射地址
     */
    public static String ALBUM_MAPPING_URL = MAPPING_PATH + "album/";


    /**
     * 文章图片保存地址
     */
     public static String ARTICLE_SAVE_PATH = SAVE_PATH + "article";

    public static void resetNewPath(String SAVE_PATH, String MAPPING_PATH) {
        BlogConstants.SAVE_PATH = SAVE_PATH;
        BlogConstants.MAPPING_PATH = MAPPING_PATH;
        WECHAT_MAPPING_URL = MAPPING_PATH + "wechat/";
        WECHAT_SAVE_PATH = SAVE_PATH + "wechat";
        PHOTO_MAPPING_URL = MAPPING_PATH + "photo/";
        PHOTO_SAVE_PATH = SAVE_PATH + "photo";
        ARTICLE_MAPPING_URL = MAPPING_PATH + "article/";
        ARTICLE_SAVE_PATH = SAVE_PATH + "article";
		ALBUM_SAVE_PATH = SAVE_PATH + "album";
		ALBUM_MAPPING_URL = MAPPING_PATH + "album/";
        BANNER_MAPPING_URL = MAPPING_PATH + "banner/";
        BANNER_SAVE_PATH = SAVE_PATH + "banner";
    }

}
